<?php
/**
*
* @package MoltX QuickChat Configuration Information
* @author $Author: moltendorf $
* @version $Id: molten_chat_information.php 144 2009-09-20 04:28:22Z moltendorf $
* @latest $URL: http://molten-chat.googlecode.com/svn/trunk/source/includes/molten_chat/molten_chat_information.php $
* @copyright (c) 2005-2009 Matthew Oltendorf
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

// PHP: Hypertext Preprocessor Document

/*
	Unfinished Items:
		1.
		2.
		3.
		4.
		5.
*/

/*
	Known Issues:
		1.
		2.
		3.
		4.
		5.
*/

/**
* @ignore
*/
if (
	!defined ('molten_chat')
)
	{
		die ('Unauthorised Access.');
	}

// Style: Object Oriented.

class molten_chat_configuration
	{
		public static $cache = 'apc';
		public static $database = 'phpbb';
		public static $instances = 2;
		public static $module = 'phpbb';
		public static $update = 30;
	}

final class molten_chat_information extends molten_chat_configuration
	{
		private static $types = array (
			'cache' => array (
				'apc',
				'shmop',
				'xcache'
			),
			'database' => array (
				'phpbb'
			),
			'module' => array (
				'phpbb'
			)
		);

		public static function initialize ()
			{
				// Verify the configuration is valid.
				foreach (self :: $types as $layer => $options)
					{
						if (
							isset (parent :: $$layer)
						)
							{
								if (
									in_array (parent :: $$layer, $options)
								)
									{
										continue;
									}
							}

						// Set the configuration to the first option.
						parent :: $$layer = $options [0];
					}
			}
	}